package 设计模式.策略模式;

/**
 * 上下文
 *
 * @author caihe
 * @date 2021/9/24 9:33
 */
public class Context {

    private Strategy strategy;

    public Context() {
    }
    
    public String doAction(String type) {
        this.strategy = StrategyFactory.getStrategy(type);
        return strategy.action();
    }
    

}
